
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">

    <title>{$sysPageTitle}</title>

    <link href="__PUBLIC__/images/favicon.ico" rel="shortcut icon" />

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap.min.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/dashboard.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-switch.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/icheck/all.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap-datetimepicker.css" />

</head>

<body>

<include file="Common/topNav" />

<div class="container-fluid">
    <div class="row">
        <include file="Common/leftMenu" />
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        	<!--标题头-->
            <div class="cont-title clearfix">
                <div class="title">企业核查列表</div>
            	<div class="btn-group">
                </div>
            </div>
            <!--搜索模块-->
        	<form class="jc-search form-inline searchForm" method="post" action="{:U('Admin/Building/Check/index')}" id="searchForm">
                    <div class="form-group">
                        <label>楼宇 :</label>
                        <select class="form-control" name="house_id">
                            <option value="" >全部</option>
                            <volist name="houses" id="item">
                                <option <if condition="$houseId eq $item['id']">selected="selected"</if> value="{$item.id}">{$item.name}</option>
                            </volist>
                        </select>
                    </div>
                    <div class="form-group">
                        <label>状态 :</label>
                        <select class="form-control" name="check_status">
                            <option value="" >全部</option>
                            <option value="1" <if condition="$status eq '1'">selected</if>>未核查</option>
                            <option value="2" <if condition="$status eq '2'">selected</if>>已核查</option>
                        </select>
                    </div>
                <div class="form-group">
                	<label>关键字 :</label>
                    <input type="text" class="form-control" name="keywords" value="{$_POST['keywords']}" placeholder=" 输入企业名称 ">
                </div>
                <button type="button" id="search" class="btn">搜索</button>
            </form>
            <!--表格-->
            <div class="table-responsive">
                <table class="table table-striped table-hover" id="tableData">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>企业名称</th>
                        <th>分类</th>
                        <th>办公地址</th>
                        <th>经营状态</th>
                        <th>核查状态</th>
                        <th>最后核查人员</th>
                        <th>最后核查日期</th>
                        <th>操 作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="checkList['list']" id="check">
                        <tr>
                            <td>{$key|getLineNum=$nowPage,$pageSize}</td>
                            <td>{$check.name}</td>
                            <td><if condition="$check['type'] eq 1">公司
                                <elseif condition="$check['type'] eq 2"/>分公司
                                <elseif condition="$check['type'] eq 3"/>办事处
                                <elseif condition="$check['type'] eq 4"/>个体
                                <else/>无照
                            </if></td>

                            <td>{$check.contact_address}</td>
                            <td>
                                <if condition="$check.status eq 1">
                                    <span class="label label-success">正常户</span>
                                    <elseif condition="$check.status eq 2"/>
                                    <span class="label label-warning">疑似户</span>
                                    <else/>
                                    <span class="label label-danger">空挂户</span>
                                </if>
                            <td>
                            <if condition="$check.check_status eq 2">
                                <span class="label label-success">已核查</span>
                                <else/>
                                <span class="label label-danger">未核查</span>
                            </if>
                        </td>
                            <td>{$check.user.user_name}</td>
                            <empty name="check_time">
                                <td> </td>
                            <else />
                                <td>{$check.check_time|date='Y-m-d',###}</td>
                            </empty>
                            <td>
                                <a thisId="{$check['id']}" class="checkDetail" href="javascript:void(0);">核查详情</a></td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <div class="page">
                	{$checkList.page}
                </div>
            </div>
	           
        </div>
    </div>
</div>
<include file="Common/modalHtmls" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-switch.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/icheck.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/validator.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/vendor/jquery.ui.widget.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery-upload/js/jquery.fileupload-process.js"></script>
<script>
    $('#datetimepicker').datetimepicker({
        format: 'yyyy-mm',
        language: 'ch',
        pickDate: true,
        pickTime: false,
        autoclose:true,
        minView: 3,
        maxView: 3,
        startView:3
        //pickerPosition:"bottom-left"
    });
    $("#tableData .editCompany").click(function () {
        var companyId = $(this).attr("companyId");
        common.htmlAjax("{:U('Admin/Company/editCompany')}", {companyId: companyId}, function (html) {
            $("#commonModal").html(html).modal({show: true, backdrop: 'static', keyboard: false});
        })
    })

    $("#companyAdd").click(function () {
        common.htmlAjax("{:U('Admin/Company/addCompany')}", {}, function (html) {
            $("#commonModal").html(html).modal({show: true, backdrop: 'static', keyboard: false});
        })
    })
    $(".checkDetail").click(function () {
        var id = $(this).attr("thisId");
        common.htmlAjax("{:U('Admin/Building/Check/checkDetail')}", {id: id}, function (html) {
            $("#commonModal").html(html).modal('toggle');
        })
    })
    $("#tableData .delTax").click(function(){
        var id = $(this).attr("companyId");
        common.confirm("提示","确定删除该税收记录?",function(){
            common.ajax("{:U('Admin/Building/Tax/delTax')}",{taxId:id},function(data){
                common.alert("提示","该税收记录删除成功!",function(){
                    common.reload();
                });
            })
        })
    });
    $("#tableData .detailCompany").click(function () {
        var companyId = $(this).attr("companyId");
        common.htmlAjax("{:U('Admin/Company/info')}", {companyId: companyId}, function (html) {
            $("#commonModal").html(html).modal({show: true, backdrop: 'static', keyboard: false});
        })
    })

    $("#search").click(function () {
        $('#searchForm').submit();
    })

   $("#load").click(function () {
        common.htmlAjax("{:U('Admin/Building/Tax/load')}", {}, function (html) {
            $("#commonModal").html(html).modal({show: true, backdrop: 'static', keyboard: false});
        })
    })

</script>
</body>
</html>
